package com.zelin.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by WF on 2020/4/2 14:59
 */
@Component
@RabbitListener(queues = "zl-chendou")
public class MyMessageListener04 {
    //1.监听获取到消息
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("zl-chendou队列收到：" + message);
    }
}
